package microsoft;

import java.util.ArrayList;
import java.util.List;
import java.util.Scanner;
import java.util.Stack;

/**
 * Created by lxy_920912 on 30/03/2017.
 */
public class Main {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int p = scanner.nextInt();
        int q = scanner.nextInt();
        int n = scanner.nextInt();
        TreeNode root = new TreeNode(-1);
        root = root.build(root,p,q,n);


    }
    public void soulution2(){
        Scanner scanner = new Scanner(System.in);
        String str = scanner.nextLine();
        Stack<Character> sStack = new Stack<Character>();
        Stack<Integer> pStack = new Stack<>();
        sStack.add(str.charAt(0));
        pStack.add(0);
        for(int i = 1;i < str.length();i++){
            if(!sStack.isEmpty()){
                sStack.push(str.charAt(i));
                pStack.push(i);

            }
            Character c = sStack.peek();
            if(c =='(' && str.charAt(i) == ')'){
                sStack.pop();
                pStack.pop();
            }else{
                sStack.push(str.charAt(i));
                pStack.push(i);
            }

        }
        if(sStack.isEmpty()){
            System.out.println(0+""+1);
        }
        int num = 1;
        int count = 0;
        count = sStack.size();
        List<String> list = new ArrayList<>();

    }
}
